package pojo;

import java.time.LocalDateTime;

public class MusicBoxes {
    private int musicBoxId;   // 音乐盒 ID
    private int userId;       // 用户 ID，关联到 Users 表
    private int songId;       // 歌曲 ID，关联到 Songs 表
    private LocalDateTime createTime;  // 创建时间

    // 无参构造函数
    public MusicBoxes() {
    }

    // 有参构造函数
    public MusicBoxes(int userId, int songId, LocalDateTime createTime) {
        this.userId = userId;
        this.songId = songId;
        this.createTime = createTime;
    }

    // Getter 和 Setter 方法
    public int getMusicBoxId() {
        return musicBoxId;
    }

    public void setMusicBoxId(int musicBoxId) {
        this.musicBoxId = musicBoxId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getSongId() {
        return songId;
    }

    public void setSongId(int songId) {
        this.songId = songId;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "MusicBoxes{" +
                "musicBoxId=" + musicBoxId +
                ", userId=" + userId +
                ", songId=" + songId +
                ", createTime=" + createTime +
                '}';
    }
}

